<include file="Public:header"/>

<div class="roadbar">
    <div class="container"><strong>权限组列表</strong></div>
</div>

<div class="main">
    <div class="container">
        <div class="main-sub">
            <a href="{:U('Group/add')}" type="button" class="btn btn-info btn-sm">新增权限组</a>
        </div>
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th width="30%">ID</th>
                    <th>组名</th>
                    <th width="30%">状态</th>
                    <th width="20%">操作</th>
                </tr>
            </thead>
            <tbody>

            <volist name="data.data" id="v">
                <tr>
                    <td>{$v.map_id}</td>
                    <td>{$v.map_name}</td>
                    <td>
                        <if condition="$v.map_active eq 1">
                            <a type="button" class="btn btn-success btn-xs">使用中</a>
                        <else/>
                            <a type="button" class="btn btn-danger btn-xs">停止</a>
                        </if>
                    </td>
                    <td>
                        <a href="{:U('Group/edit','gid='.$v['map_id'])}">编辑</a>&nbsp;/&nbsp;
                        <if condition="$v.map_active eq 1">
                            <a href="{:U('Record/stat','type=mangroup&str=map_active&id='.$v['map_id'])}">停止</a>&nbsp;/&nbsp;
                            <a href="{:U('Group/power','gid='.$v['map_id'])}">权限配置</a>&nbsp;/&nbsp;
                            <else/>
                            <a href="{:U('Record/stat','type=mangroup&str=map_active&id='.$v['map_id'])}">启用</a>&nbsp;/&nbsp;
                        </if>
                        <a href="{:U('Record/del','type=mangroup&id='.$v['map_id'])}">删除</a>
                    </td>
                </tr>
            </volist>

            <tr>
                <td colspan="5" height="39">{$data.page}</td>
            </tr>

            </tbody>
        </table>


    </div>
</div>

<include file="Public:footer"/>
